home *** CD-ROM | disk | FTP | other *** search
/ PCNet 2004 October / PCNET_CD_2004_10_1.iso / shareware / SESDemo.exe / {app} / CGI / cgiwrap.aspx < prev    next >
Encoding:
Text File  |  2004-06-30  |  687 b   |  26 lines

  1. <!--#include file="header.htm" -->
  2.  
  3. <%@ Page aspcompat=true %>
  4. <%
  5. Dim cgiPath = "(scriptpath)"
  6. Dim scrName = Request.ServerVariables("URL")
  7. Dim query = Request.ServerVariables("QUERY_STRING")
  8.  
  9. if query <> "" then
  10.     Dim url = cgiPath & "?" & query & "&wrap=" & scrName
  11.     Dim xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
  12.     
  13.     Try
  14.         xml.Open ("GET", url, False)
  15.     Catch ex As Exception
  16.         Dim newUrl As New UriBuilder (Request.Url.Scheme, Request.Url.Host, Request.Url.Port, cgiPath & "?" & query & "&wrap=" & scrName)
  17.         xml.Open ("GET", newUrl.ToString, False)
  18.     End Try
  19.     
  20.     xml.Send()
  21.     Response.write (xml.Responsetext)
  22. end if
  23. %>
  24.  
  25. <!--#include file="footer.htm" -->
  26.